//
//  HttpsManager.h
//  EJLX
//
//  Created by adc on 15/11/9.
//  Copyright © 2015年 江苏一键联信息科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "ZhuCeDL.h"
#import "GoodsForMyShop.h"
#import "XinXiJianJie.h"
#import "XiuGaiMiMa.h"
#import "PublicNotice.h"
#import "GeRenJiShi.h"
#import "ShoppingModel.h"
#import "ShangPinXiangQing.h"
#import "SaveDianPuSheZhi.h"
#import "GoodsDetailInfo.h"
#import "BankList.h"
#import "City.h"
#import "JiaRuModel.h"
#import "ClassOfGoods.h"
#import "YiBaoZhiFu.h"
#import "jiaRuGouWuChe.h"
#import "Address.h"
#import "WDWD.h"
#import "GengXinDianPuZiLiao.h"
#import "ShoppingCar.h"
#import "weiXinDingDan.h"
#import "woDeDingDan.h"
#import "FirstWoDeWeiDian.h"
#import "WoDeShouRu.h"
#import "TwoWoDeShouRu.h"
#import "MyFenDian.h"
#import "ShangPinFeNLeiShuXing.h"
#import "o2oShouYinTai.h"
#import "ZhiFuDiaoYongJIeKou.h"
#import "duanXinYanZheng.h"
#import "ShangPinGuanLi.h"
#import "addInfoGoodToCar.h"
#import "PinPaiFenXiao.h"
#import "SouSuoJieGuo.h"
#import "ZhangDanMingXi.h"
#import "FebRunLeiJiShouRu.h"
#import "JieSuanShuJu.h"
#import "ShouCangJia.h"

#define RGB_COLOR(RGB)   [UIColor colorWithRed:(float)((RGB &0xFF0000)>>16)/255.0 green:(float)((RGB &0xFF00)>>8)/255.0 blue:(float)((RGB &0xFF))/255.0 alpha:1]
#define RGB(R,G,B) [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1]
#define ACCESS_TOKEN_KEY @"token"
#define ACCESS_TOKEN  [[NSUserDefaults standardUserDefaults]objectForKey:ACCESS_TOKEN_KEY]
#define HTTPS_ID @"http://121.42.211.76/"
#define TOKEN_FRIST @"0000000"
#define  ERRCODE_SHOPNOT 12700
#define   ERRCODE_WUXIAO 10014
#define  ERRCODE_BCZ 10100
//wifi1 ---051265578286

#define SHOW_YESNO(str)  UIAlertView * alertView = [[UIAlertView alloc]initWithTitle:@"提示" message:str delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];[alertView show];

#define BEGAIN_LOGIN_block(no_nil)   if(errcode==10014||errcode==10100){\
                                               block(nil);\
                                           }else{\
                                           no_nil };
#define BEGAIN_LOGIN_completion(is_no_nil)   if (errcode==10014||errcode==10100){\
if (completion){completion(nil);}}\
else{\
is_no_nil \
};


//@"http://192.168.0.102:8080/ejlapp"
// @"http://139.196.53.184:8080"
//21447917345634

@interface HttpsManager : NSObject

+(void)priBlock:(void(^)(NSDictionary *dict))block;

//
+(void)removeShouCangWithType:(NSString *)type favorited:(NSString *)fav completionBlock:(void(^)(NSString *errmsg))block;
+(BOOL)isLogin;
+(void)imageRequestBlock:(void(^)(NSArray *imgArr,NSArray *typeArr))block;


+(void)requestForPersonalBlock:(void(^)(NSDictionary *dict))block;


+(void)requestForMyShopDoodsBlock:(void(^)(NSMutableArray *goodsArray))block;

//判断是否需要重新登陆
+(BOOL)isNeedLogin;
//注册

+(void)registerRequestWithPhoneNumber:(ZhuCeDL*)zhuCe completion:(void(^)(int errcode,NSString*errmsg))completion ;
//登录
//自动登录
+(void)requestZiDongDengLuCompletion:(void(^)(int errcode,NSString*errmsg))complete;
+(void)LoginRequestWithPhoneNumber:(ZhuCeDL *)dengLu completion:(void(^)(int errcode,NSString*errmsg))completion;
+(void)getLunBoTu:(void(^)(NSArray*array,NSString*error))completion;
//找回密码
//+(void)zhaoHuiMiMaRequestWith:(ZhuCeDL*)zhaoHui completion:(void(^)(NSString*error))completion;
//品牌分销数据
+(void)requestToGetPinPaiFenXiaoCompletion:(void(^)(NSArray * newsListArray))complete;
//简介信息
+(void)requestJianJieXinXiCompletion:(void(^)(XinXiJianJie*xinXi))completion;
//修改密码
+(void)requestXiuGaiMiMaXiuGai:(XiuGaiMiMa*)xiuGai compeletion:(void(^)(int errcode,NSString*errmsg,NSString*token))compeletion;

//收藏夹
+(void)shouCangJiaType:(NSString *)type page:(NSString *)page completionBlock:(void(^)(NSMutableArray *array))block;
//软件更新
+(void)requsetGetVersionForAPPBlock:(void(^)(NSDictionary *dict))block;
//系统公告
+(void)requestForPublicWithType:(int)type page:(int)page completionBlock:(void(^)(NSMutableArray *publicArray,int totalPage ,int currentPage,int pageNum))block;
//商城首页

+(void)requestForShoppingViewBlock:(void(^)(ShoppingModel *shopping))block;

//我的微店首页
+(void)requestGetWoDeWeiDianCompletion:(void(^)(FirstWoDeWeiDian*weiDian))Complete;
////info
//+(void)requestForDetailInfoWithProductID:(int)ID completionBlock:(void(^) (GoodsDetailInfo *detail))block;

//获取用户资料完善情况
+(void)requestGetYHZLWSQKCpmpletion:(void(^)(NSArray*dataAry))Complete;
+(void)wanShancomplection:(void(^)(int genRen,int diZhi,int img))block;
//修改头像
+(void)requestToUploadImage:(UIImage*)image completion:(void(^)(int errcode,NSString*errmsg,NSString*image))complete;

//info
+(void)requestForDetailInfoWithProductID:(int)ID completionBlock:(void(^) (GoodsDetailInfo *detail))block;
//购物车
+(void)getGouWuCheList:(void(^)(ShoppingCar *car))block;

+(void)addGoodsToShouCangJiaItemID:(NSString *)itemID completion:(void(^)(NSString *errmsg))block;

+(void)deleteCarWithGroups:(NSMutableArray *)groupsArr itemsArray:(NSMutableArray *)itemsArray completion:(void(^)(NSString *errmsg))block;
+(void)addNumberItemID:(NSString *)itemID num:(NSString *)num completion:(void(^)(NSString *errmsg))block;

//获取手机验证码
+(void)requestGetShouJiYanZhengMa:(NSString*)phone compeletion:(void(^)(int errcode,NSString*errmsg))compeletion;

//上架
+(void)requestGetShangJiaShangPinProducts:(NSMutableArray *)products  requestUrl:(NSString *)url Competion:(void(^)(int errcode,NSString*errmsg))Complete;
//删除购物车
+(void)deleteGoodsFromShoppingCarItems:(int)items groups:(int )groups completionBlock:(void(^) (NSString *errmsg))block;

//加入购物车
+(void)addGoodsInShoppingCarWithProductId:(int)shopProductId completionBlock:(void(^) (NSString *errmsg))block;

////提交个人信息和银行资料
//+(void)postPeopleInforName:(NSString *)name card:(NSString *)card address:(NSString *)address email:(NSString *)email shopName:(NSString *)shopName  block:(void(^)(NSString *msg))block;
//+(void)postBankCard:(NSString *)card name:(NSString *)name bank:(int)bank location:(NSString *)diqu branch:(NSString *)addressName completionBlock:(void(^)(NSString *msg))block;

// -银行列表
+(void)banklist:(void(^)(NSArray *bankArray))block;
+(void)addGoodsFofCarWithProductID:(NSString *)productID Completion:(void(^)(addInfoGoodToCar*ary))completion;
//新增收获地址
+(void)postAdressName:(NSString *)name phone:(NSString *)phone address:(City *)address  completionBlock:(void(^)(NSString *msg))block;
+(void)getAddressBlock:(void (^)(NSMutableArray *addressArray))block;

//购物车
//+(void)requestToGetGouWuCheCompletion:(void(^)(NSArray*array))completion;
//获取商品评价统计
//+(void)requestToGetPingJiaCompletion:(void(^)(NSArray*array))completion;
//搜索结果页
+(void)requestSouSuoJieGuo:(NSString*)name tab:(NSString*)tab completion:(void(^)(SouSuoJieGuo*search))completion ;

// 商品详情
+(void)requestToGetShangPinXiangQingCompletion:(NSString*)productId com:(void(^)(ShangPinXiangQing*shangPin))completion;
//加入购物车
+(void)requestToGetJiaRuGouWuCheCompletion:(jiaRuGouWuChe*)jiaRu completion:(void(^)(int error,NSString*errmsg))completion;
//获取获取商品分类属性选择列表
+(void)requestToGetShangPinFenLeiShuXingProductID:(NSString *)productID Completion:(void(^)(NSArray*ary))completion;
//我的微店

//分销分类
+(void)classOfGoodswithCategoryID:(int)cateId completionBlock:(void(^)(NSMutableArray *arr))block;
+(void)classBtnBlock:(void(^)(NSMutableArray *array))block;
//易宝支付
+(void)requestYiBaoZhiFu:(YiBaoZhiFu*)yiBao completion:(void(^)(int paycode,NSString*paymsg))Complete;
//我的微电   最近几天上线
+(void)requestWDWD:(NSString*)shopID completion:(void(^)(WDWD*me))complete;
//更新店铺资料
+(void)regquestGengXin:(GengXinDianPuZiLiao*)gengXin completion:(void(^)(int errcode,NSString*errmsg))completion ;
//取消订单
+(void)requestQuXiaoDingDanCompletion:(NSString*)orderId completion:(void(^)(NSString*errmsg,int errcode))complete;
//评价
+(void)requestPingJiaCompletion:(NSString*)orderId pingFen:(NSString*)service coment:(NSString*)comment completion:(void(^)(int errcode,NSString*errmsg))completion;
//上传店铺招牌
+(void)requestDianPuZhaoPaiImage:(UIImage*)image completion:(void(^)(int errcode,NSString*errmsg))complete;
//首页轮播
+(void)lunboID:(int)ID class:(int )class Block:(void(^)(NSMutableArray *imgArr,NSMutableArray *Class))block;
//提交个人信息和银行资料
+(void)postimage:(UIImage *)img block:(void(^)(NSString *err))block;
+(void)postPeopleInforName:(NSString *)name card:(NSString *)card address:(NSString *)address email:(NSString *)email shopName:(NSString *)shopName  block:(void(^)(NSString *msg))block;
+(void)postBankCard:(NSString *)card name:(NSString *)name bank:(NSString *)bank location:(NSString *)diqu zhihang:(NSString *)zhihang completionBlock:(void(^)(NSString *msg))block;
+(void)postPersonImagesCompletion:(void(^)(int errcode,NSString*errmsg))complete;

//020订单
+(void)requestGetWodeDingDan:(NSString*)str  Competion:(void(^)(woDeDingDan*dingDan))Complete;

//微信订单
+(void)requestGetWeiDianDingDan:(NSString*)str type:(NSString*)type Competion:(void(^)(weiXinDingDan*weiDian))Complete;
//我的收入
+(void)requestGetWODeShouRu:(void(^)(WoDeShouRu*shouRu))Complete;
//我的分店
+(void)requestMyFenDian:(NSString*)status completion:(void(^)(MyFenDian*fD))complete;
//个人集市
+(void)requestToGetGRJSCompletion:(void(^)(GeRenJiShi*gr))completion;
//收藏
+(void)requestGetshouCang:(NSString*)str shop:(NSString*)shopId  Competion:(void(^)(int errcode,NSString*errmsg))Complete;
//请求生成支付
+(void)requestGet020ShouYinTai:(o2oShouYinTai*)shouYin   Competion:(void(^)(ZhiFuDiaoYongJIeKou*zhiFu))Complete;
//获取支付短信验证码
+(void)requestGetZhiFuYanZhengMa:(duanXinYanZheng*)duanXin completion:(void(^)(int errcode,NSString*errmsg))Complete;
//易宝支付短信验证
+(void)registerDuanXinYanZheng:(duanXinYanZheng*)duanXin completion:(void(^)(int paycode,NSString*paymsg))completion ;
//我的商品
+(void)registerWoDeShangPin:(NSString*)shopId type:(NSString*)type completion:(void(^)(int errcode, ShangPinGuanLi*guanLi))completion ;
//置顶接口
+(void)registerzhiDing:(NSString*)productId  completion:(void(^)(NSString*errmsg))completion ;

//立即下单
+(void)requestLiJiXiaDan:(JiaRuModel*)model  completion:(void(^)(NSString*orderId,NSString*money,NSString*errmsg,int errcode))completion ;
//确认订单
+(void)requestqueRenXiaDan:(NSMutableArray*)itmes address:(NSString*)addresseeId  completion:(void(^)(NSMutableArray*ordersAry,int totalMoney,NSString*errmsg,int errcode))completion ;
//店铺资料

+(void)requestGetDianPuSheZhi:(void(^)(NSMutableArray*xinXiAry))Complete;
//品牌分校
+(void)requestPinPaiFenXiao:(NSString*)brandDistri categoryID:(NSString *)categoryID sub:(NSString*)sub  page:(NSString *)page shopID:(NSString *)shopID  tab:(NSString *)tab completion:(void(^)(PinPaiFenXiao*pinPai))complete;
//账单明细
+(void)requestZhangDanMingXi:(NSString*)type  completion:(void(^)(ZhangDanMingXi*mingXi))complete;
//分润累计收入
+(void)requestFenRunLeiJiShouRu:(NSString*)type comoletion:(void(^)(FebRunLeiJiShouRu*fenRun))complete;
//  结算页面数据
+(void)requestJieSuan:(NSString*)accountId comoletion:(void(^)(JieSuanShuJu*jieSuan))complete;

//结算

+(void)requestJieSuanAnNiu:(NSString*)accountId amont:(NSString*)amount comoletion:(void(^)(NSString*errmsg,int errcode, NSString* walletId,NSString* amount))complete;
//微店累计收入
+(void)requestWeiDianLeiJiShouRuCompletion:(void(^)(NSMutableArray*shouRuAry))completion;

//值得搜
+(void)requestZhiDeSouCompletion:(void(^)(NSMutableArray*zhiDeAry))completion;

//+(void)requestShangPinShaiXuan:()


@end
